package com.homedo.async.mysql.support.convertor.forcolumnname;


import com.homedo.async.mysql.support.dao.TypeChecker;

/**
 * @author jgshun
 * @date 2020/1/20 11:50 AM
 */
public class CompositeConditionColumnNameConvertor implements ConditionColumnNameConvertorI {

    @Override
    public String convertor(String columnName, Class columnClz) {
        TypeChecker.TypeEnum typeEnum = TypeChecker.checkType(columnClz);
        if (typeEnum == TypeChecker.TypeEnum.DATE) {
            return DateConditionColumnNameConvertor.getInstance().convertor(columnName, columnClz);
        }
        return CommonConditionColumnNameConvertor.getInstance().convertor(columnName, columnClz);
    }
}
